home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / May 96 / Compile Problems < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  5.2 KB  |  [TEXT/ttxt]

  1. Subject:     Compile Problems
  2. Sent:        5/24/96 12:12 PM
  3. Received:    5/24/96 12:21 PM
  4. From:        Hutchings Software Development, hsd@earthlink.net
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. Hi,
  9.  
  10. Here's what I'm trying to do. Basically, using FW_CEditText as a model
  11. (but not a superclass), I'm trying to write a general scrolling,
  12. styled text view in one class. It needs to be both a notifier and a
  13. receiver. 
  14.  
  15. I copied the following out of the CW Message Box.
  16.  
  17.  
  18. Error   : illegal use of abstract class ('FW_MReceiver::HandleNotification(Environment*,constFW_CNotification&)')
  19.  
  20. StyleEditView.cpp line 894   FW_CPrivWatcher(FW_PrivGetDeleteProc((const CStyleEditView*)0))) CStyleEditView(ev), FW_PrivWatcher_Pop() )
  21.  
  22.  
  23. The code the compiler chokes on looks like:
  24.  
  25. //------------------------------------------------------------------------
  26. //    CStyleEditView::Create
  27. //------------------------------------------------------------------------
  28.  
  29. void* CStyleEditView::Create(    FW_CReadableStream&        stream,
  30.                         FW_ClassTypeConstant    type    )
  31. {
  32.     FW_UNUSED(stream);
  33.     FW_UNUSED(type);
  34.     
  35.     FW_SOMEnvironment ev;
  36.     return FW_NEW(CStyleEditView, (ev));        // here's where it chokes
  37. }
  38.  
  39. The start of my class definition looks like:
  40.  
  41. class CStyleEditView :    public FW_CView,
  42.                     public FW_MReceiver,
  43.                     public FW_MNotifier
  44. {
  45.     public:
  46.         FW_DECLARE_CLASS
  47.         FW_DECLARE_AUTO(CStyleEditView)
  48.  
  49.  
  50. and I have the following macros at the top of my .cpp file:
  51.  
  52. FW_DEFINE_CLASS_M3(CStyleEditView, FW_CView, FW_MReceiver,
  53. FW_MNotifier)
  54. FW_DEFINE_AUTO(CStyleEditView)
  55.  
  56. const FW_ClassTypeConstant LStyleEditView =
  57. FW_TYPE_CONSTANT('S','t','E','V');
  58. FW_REGISTER_ARCHIVABLE_CLASS(    LStyleEditView,
  59.                         CStyleEditView,
  60.                         CStyleEditView::Create,
  61.                         FW_CView::Read,
  62.                         CStyleEditView::Destroy,
  63.                         FW_CView::Write    )
  64.  
  65.  
  66. Any ideas? I've found it a little difficult to parse through all the
  67. macros. I'm probably overlooking something very silly ;-).
  68.  
  69. Thanks,
  70.  
  71. Brad
  72.  
  73.  
  74.  
  75.  
  76. Richard B. "Brad" Hutchings
  77. General Partner,
  78. Hutchings Software Development
  79.  
  80. hsd@earthlink.net
  81.  
  82.  
  83. <SMALLER><SMALLER><X-FONTSIZE><PARAM>9</PARAM><X-FONTNAME><PARAM>MPW</PARAM>Hi,
  84.  
  85.  
  86. Here's what I'm trying to do. Basically, using FW_CEditText as a model
  87. (but not a superclass), I'm trying to write a general scrolling,
  88. styled text view in one class. It needs to be both a notifier and a
  89. receiver. 
  90.  
  91.  
  92. I copied the following out of the CW Message Box.
  93.  
  94.  
  95.  
  96. </X-FONTNAME></X-FONTSIZE></SMALLER></SMALLER><X-COLOR><PARAM>RED=0;GREEN=9830;BLUE=61603</PARAM><SMALLER><SMALLER><X-FONTSIZE><PARAM>9</PARAM><X-FONTNAME><PARAM>MPW</PARAM>Error   : illegal use of abstract
  97. class ('FW_MReceiver::HandleNotification(Environment*,constFW_CNotification&)')
  98.  
  99.  
  100. StyleEditView.cpp line 894   FW_CPrivWatcher(FW_PrivGetDeleteProc((const CStyleEditView*)0))) CStyleEditView(ev), FW_PrivWatcher_Pop() )
  101.  
  102. </X-FONTNAME></X-FONTSIZE></SMALLER></SMALLER></X-COLOR><SMALLER><SMALLER><X-FONTSIZE><PARAM>9</PARAM><X-FONTNAME><PARAM>MPW</PARAM>
  103.  
  104.  
  105. The code the compiler chokes on looks like:
  106.  
  107.  
  108. </X-FONTNAME></X-FONTSIZE></SMALLER></SMALLER><X-COLOR><PARAM>RED=0;GREEN=9830;BLUE=61603</PARAM><SMALLER><SMALLER><X-FONTSIZE><PARAM>9</PARAM><X-FONTNAME><PARAM>MPW</PARAM>//------------------------------------------------------------------------
  109.  
  110. //    CStyleEditView::Create
  111.  
  112. //------------------------------------------------------------------------
  113.  
  114.  
  115. void* CStyleEditView::Create(    FW_CReadableStream&        stream,
  116.  
  117.                         FW_ClassTypeConstant    type    )
  118.  
  119. {
  120.  
  121.     FW_UNUSED(stream);
  122.  
  123.     FW_UNUSED(type);
  124.  
  125.     
  126.  
  127.     FW_SOMEnvironment ev;
  128.  
  129.     return FW_NEW(CStyleEditView, (ev));        // here's where it chokes
  130.  
  131. }
  132.  
  133. </X-FONTNAME></X-FONTSIZE></SMALLER></SMALLER></X-COLOR><SMALLER><SMALLER><X-FONTSIZE><PARAM>9</PARAM><X-FONTNAME><PARAM>MPW</PARAM>
  134.  
  135. The start of my class definition looks like:
  136.  
  137.  
  138. </X-FONTNAME></X-FONTSIZE></SMALLER></SMALLER><X-COLOR><PARAM>RED=0;GREEN=9830;BLUE=61603</PARAM><SMALLER><SMALLER><X-FONTSIZE><PARAM>9</PARAM><X-FONTNAME><PARAM>MPW</PARAM>class CStyleEditView :    public
  139. FW_CView,
  140.  
  141.                     public FW_MReceiver,
  142.  
  143.                     public FW_MNotifier
  144.  
  145. {
  146.  
  147.     public:
  148.  
  149.         FW_DECLARE_CLASS
  150.  
  151.         FW_DECLARE_AUTO(CStyleEditView)
  152.  
  153. </X-FONTNAME></X-FONTSIZE></SMALLER></SMALLER></X-COLOR><SMALLER><SMALLER><X-FONTSIZE><PARAM>9</PARAM><X-FONTNAME><PARAM>MPW</PARAM>
  154.  
  155.  
  156. and I have the following macros at the top of my .cpp file:
  157.  
  158.  
  159. </X-FONTNAME></X-FONTSIZE></SMALLER></SMALLER><X-COLOR><PARAM>RED=0;GREEN=9830;BLUE=61603</PARAM><SMALLER><SMALLER><X-FONTSIZE><PARAM>9</PARAM><X-FONTNAME><PARAM>MPW</PARAM>FW_DEFINE_CLASS_M3(CStyleEditView, FW_CView, FW_MReceiver, FW_MNotifier)
  160.  
  161. FW_DEFINE_AUTO(CStyleEditView)
  162.  
  163.  
  164. const FW_ClassTypeConstant LStyleEditView =
  165. FW_TYPE_CONSTANT('S','t','E','V');
  166.  
  167. FW_REGISTER_ARCHIVABLE_CLASS(    LStyleEditView,
  168.  
  169.                         CStyleEditView,
  170.  
  171.                         CStyleEditView::Create,
  172.  
  173.                         FW_CView::Read,
  174.  
  175.                         CStyleEditView::Destroy,
  176.  
  177.                         FW_CView::Write    )
  178.  
  179. </X-FONTNAME></X-FONTSIZE></SMALLER></SMALLER></X-COLOR><SMALLER><SMALLER><X-FONTSIZE><PARAM>9</PARAM><X-FONTNAME><PARAM>MPW</PARAM>
  180.  
  181.  
  182. Any ideas? I've found it a little difficult to parse through all the
  183. macros. I'm probably overlooking something very silly ;-).
  184.  
  185.  
  186. Thanks,
  187.  
  188.  
  189. Brad
  190.  
  191.  
  192.  
  193.  
  194.  
  195. Richard B. "Brad" Hutchings
  196.  
  197. General Partner,
  198.  
  199. Hutchings Software Development
  200.  
  201.  
  202. hsd@earthlink.net</X-FONTNAME></X-FONTSIZE></SMALLER></SMALLER>
  203.